Check validity and availability of usernames during signup via AJAX
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 7 Mar 2014 17:39:51 +0000 (18:39 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 10 Mar 2014 16:16:59 +0000 (17:16 +0100)
commit74b222230da8a3dadc4d03e1a3e000c1ca09e12a
treeb3ca0dbd0a96d4970e6fc1ae1ad6b75464de95eb
parent142db358fc57bcdb452f5e8ef5071b25c87f6f36
Check validity and availability of usernames during signup via AJAX

This is done in addition to the server-side checks. Users who have
disabled JavaScript will not notice any difference.

The way this is done (via action=query&list=users API) means that we
can't check for all possible error conditions, both for the username
(e.g. these enforced by extensions like AntiSpoof) and other parts of
the form (e-mail, password…) – these are still handled server-side
only. Thus we intentionally never say that whatever the user typed in
is valid – we only warn when we know it's not.

Doing this "properly" would require some reworking of the internals of
the signup process and this way is already a huge improvement.

(Split off from the reverted a0c72523.)

Bug: 34447
Change-Id: I42c00b54651fd4e7217a862b3116c6113935f5ae
RELEASE-NOTES-1.23
includes/templates/Usercreate.php
resources/Resources.php
resources/mediawiki.special/mediawiki.special.userlogin.signup.js